#include "AbsFactory.h"

void WinText::render()
{
    std::cout << "Windows Text is rendering " << std::endl;
}

void MacText::render()
{
    std::cout << "Mac Text is rendering " << std::endl;
}

void WinRadio::check(){
    std::cout << "Windows Radio is rendering " << std::endl;
}

void MacRadio::check(){
    std::cout << "Mac Radio is rendering " << std::endl;
}

std::unique_ptr<AText> WinFactory::createText(){
    return std::make_unique<WinText>();
}

std::unique_ptr<ARadio> WinFactory::createRadio(){
    return std::make_unique<WinRadio>();
}

std::unique_ptr<AText> MacFactory::createText(){
    return std::make_unique<MacText>();
}

std::unique_ptr<ARadio> MacFactory::createRadio(){
    return std::make_unique<MacRadio>();
}

void App::show(){
    std::unique_ptr<AText> text = _factory->createText();
    std::unique_ptr<ARadio> radio = _factory->createRadio();
    text->render();
    radio->check();
}